package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"shop-cart/api/internal/config"
	"shop-cart/taobaorpc/taobaorpcclient"
)

type ServiceContext struct {
	Config    config.Config
	TaoBaoRpc taobaorpcclient.Taobaorpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		TaoBaoRpc: taobaorpcclient.NewTaobaorpc(zrpc.MustNewClient(c.TaoBaoRpc)),
	}
}
